package com.yc.boot.work.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yc.boot.work.entity.ComplexSqlDemo;
import com.yc.boot.work.entity.CorrelationDemo;
import com.yc.boot.work.mapper.CorrelationDemoMapper;
import com.yc.boot.work.service.CorrelationDemoService;
import org.springframework.stereotype.Service;

/**
 * @author 杨智杰
 * @since 2021/11/19 11:12
 */
@Service
public class CorrelationDemoServiceImpl extends ServiceImpl<CorrelationDemoMapper, CorrelationDemo> implements CorrelationDemoService {
    @Override
    public ComplexSqlDemo getComplexSqlDemo() {
        /**
         * 已经extends过CorrelationDemoMapper了,
         * 所以不需要再额外注入,
         * 直接调用baseMapper就是调用CorrelationDemoMapper
         */
        return baseMapper.select();
    }
}
